package com.example.springbootdubboconsumer.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.example.demo.model.User;
import com.example.demo.service.UserService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 杰哥
 * @Title: DemoConsumerController
 * @ProjectName springboot-dubbo-consumer
 * @Description: TODO
 * @date 2019/7/215:27
 */
@RestController
public class DemoConsumerController {

    @Reference
    private UserService demoService;


    @RequestMapping("/hello")
    public List<User> hello(String name) {
        return demoService.select();

    }

}
